From fceeffe7558fc4cbab8d2d5062ad6cf2930ce850 Mon Sep 17 00:00:00 2001 From: Michael Williamson Date: Thu, 20 Jul 2023 23:31:04 +0100 Subject: Introduce operands to Patio --- ...mpiler.testing.snapshots.Snapshotter)].expected | 14 +++++----- ...mpiler.testing.snapshots.Snapshotter)].expected | 28 +++++++++---------- ...mpiler.testing.snapshots.Snapshotter)].expected | 32 +++++++++++----------- 3 files changed, 37 insertions(+), 37 deletions(-) (limited to 'snapshots/[engine:junit-jupiter]/[class:org.shedlang.compiler.patio.PatioCodeGenDefineFunctionTests]') diff --git a/snapshots/[engine:junit-jupiter]/[class:org.shedlang.compiler.patio.PatioCodeGenDefineFunctionTests]/[method:canDefineMinimalFunction(org.shedlang.compiler.testing.snapshots.Snapshotter)].expected b/snapshots/[engine:junit-jupiter]/[class:org.shedlang.compiler.patio.PatioCodeGenDefineFunctionTests]/[method:canDefineMinimalFunction(org.shedlang.compiler.testing.snapshots.Snapshotter)].expected index 7dac2aa1..5a3fa324 100644 --- a/snapshots/[engine:junit-jupiter]/[class:org.shedlang.compiler.patio.PatioCodeGenDefineFunctionTests]/[method:canDefineMinimalFunction(org.shedlang.compiler.testing.snapshots.Snapshotter)].expected +++ b/snapshots/[engine:junit-jupiter]/[class:org.shedlang.compiler.patio.PatioCodeGenDefineFunctionTests]/[method:canDefineMinimalFunction(org.shedlang.compiler.testing.snapshots.Snapshotter)].expected @@ -8,8 +8,8 @@ Compilation unit elements: locals=(("tmp__0" int)) return-type=int body=( - (int-get "tmp__0" 0) - (return "tmp__0") + (int-get (local "tmp__0") 0) + (return (local "tmp__0")) ) ) @@ -23,16 +23,16 @@ Args: Instructions: ( - (alloc "closurePointer__0" (struct (function-ptr (struct ())))) - (function-pointer-get "closureFunctionPointer__0" "shed__function__f__0") + (alloc (local "closurePointer__0") (struct (function-ptr (struct ())))) + (function-pointer-get (local "closureFunctionPointer__0") "shed__function__f__0") ( memory-store - pointer="closurePointer__0" + pointer=(local "closurePointer__0") layout=(struct (function-ptr (struct ()))) offset=(0) - value="closureFunctionPointer__0" + value=(local "closureFunctionPointer__0") ) - (data-ptr-to-int "closure__0" "closurePointer__0") + (data-ptr-to-int (local "closure__0") (local "closurePointer__0")) ) Temporary stack: diff --git a/snapshots/[engine:junit-jupiter]/[class:org.shedlang.compiler.patio.PatioCodeGenDefineFunctionTests]/[method:freeVariablesAreStoredInAndLoadedFromEnvironment(org.shedlang.compiler.testing.snapshots.Snapshotter)].expected b/snapshots/[engine:junit-jupiter]/[class:org.shedlang.compiler.patio.PatioCodeGenDefineFunctionTests]/[method:freeVariablesAreStoredInAndLoadedFromEnvironment(org.shedlang.compiler.testing.snapshots.Snapshotter)].expected index 9a42fdbc..6df79ecc 100644 --- a/snapshots/[engine:junit-jupiter]/[class:org.shedlang.compiler.patio.PatioCodeGenDefineFunctionTests]/[method:freeVariablesAreStoredInAndLoadedFromEnvironment(org.shedlang.compiler.testing.snapshots.Snapshotter)].expected +++ b/snapshots/[engine:junit-jupiter]/[class:org.shedlang.compiler.patio.PatioCodeGenDefineFunctionTests]/[method:freeVariablesAreStoredInAndLoadedFromEnvironment(org.shedlang.compiler.testing.snapshots.Snapshotter)].expected @@ -10,19 +10,19 @@ Compilation unit elements: body=( ( memory-load - "local__a" - pointer="closurePointer__0" + (local "local__a") + pointer=(local "closurePointer__0") layout=(struct (function-ptr (struct (int int)))) offset=(1 0) ) ( memory-load - "local__b" - pointer="closurePointer__0" + (local "local__b") + pointer=(local "closurePointer__0") layout=(struct (function-ptr (struct (int int)))) offset=(1 1) ) - (return "local__a") + (return (local "local__a")) ) ) @@ -38,29 +38,29 @@ Args: Instructions: ( - (alloc "closurePointer__0" (struct (function-ptr (struct (int int))))) - (function-pointer-get "closureFunctionPointer__0" "shed__function__f__0") + (alloc (local "closurePointer__0") (struct (function-ptr (struct (int int))))) + (function-pointer-get (local "closureFunctionPointer__0") "shed__function__f__0") ( memory-store - pointer="closurePointer__0" + pointer=(local "closurePointer__0") layout=(struct (function-ptr (struct (int int)))) offset=(0) - value="closureFunctionPointer__0" + value=(local "closureFunctionPointer__0") ) - (data-ptr-to-int "closure__0" "closurePointer__0") + (data-ptr-to-int (local "closure__0") (local "closurePointer__0")) ( memory-store - pointer="closurePointer__0" + pointer=(local "closurePointer__0") layout=(struct (function-ptr (struct (int int)))) offset=(1 0) - value="local__a" + value=(local "local__a") ) ( memory-store - pointer="closurePointer__0" + pointer=(local "closurePointer__0") layout=(struct (function-ptr (struct (int int)))) offset=(1 1) - value="local__b" + value=(local "local__b") ) ) diff --git a/snapshots/[engine:junit-jupiter]/[class:org.shedlang.compiler.patio.PatioCodeGenDefineFunctionTests]/[method:positionalAndNamedParamsAreDefined(org.shedlang.compiler.testing.snapshots.Snapshotter)].expected b/snapshots/[engine:junit-jupiter]/[class:org.shedlang.compiler.patio.PatioCodeGenDefineFunctionTests]/[method:positionalAndNamedParamsAreDefined(org.shedlang.compiler.testing.snapshots.Snapshotter)].expected index 2f29a402..409ebf16 100644 --- a/snapshots/[engine:junit-jupiter]/[class:org.shedlang.compiler.patio.PatioCodeGenDefineFunctionTests]/[method:positionalAndNamedParamsAreDefined(org.shedlang.compiler.testing.snapshots.Snapshotter)].expected +++ b/snapshots/[engine:junit-jupiter]/[class:org.shedlang.compiler.patio.PatioCodeGenDefineFunctionTests]/[method:positionalAndNamedParamsAreDefined(org.shedlang.compiler.testing.snapshots.Snapshotter)].expected @@ -10,21 +10,21 @@ Compilation unit elements: body=( ( memory-load - "local__a" - pointer="closurePointer__0" + (local "local__a") + pointer=(local "closurePointer__0") layout=(struct (function-ptr (struct (int int)))) offset=(1 0) ) ( memory-load - "local__b" - pointer="closurePointer__0" + (local "local__b") + pointer=(local "closurePointer__0") layout=(struct (function-ptr (struct (int int)))) offset=(1 1) ) - (int-add "tmp__0" "local__a" "local__param1") - (int-add "tmp__1" "tmp__0" "local__paramA") - (return "tmp__1") + (int-add (local "tmp__0") (local "local__a") (local "local__param1")) + (int-add (local "tmp__1") (local "tmp__0") (local "local__paramA")) + (return (local "tmp__1")) ) ) @@ -40,29 +40,29 @@ Args: Instructions: ( - (alloc "closurePointer__0" (struct (function-ptr (struct (int int))))) - (function-pointer-get "closureFunctionPointer__0" "shed__function__f__0") + (alloc (local "closurePointer__0") (struct (function-ptr (struct (int int))))) + (function-pointer-get (local "closureFunctionPointer__0") "shed__function__f__0") ( memory-store - pointer="closurePointer__0" + pointer=(local "closurePointer__0") layout=(struct (function-ptr (struct (int int)))) offset=(0) - value="closureFunctionPointer__0" + value=(local "closureFunctionPointer__0") ) - (data-ptr-to-int "closure__0" "closurePointer__0") + (data-ptr-to-int (local "closure__0") (local "closurePointer__0")) ( memory-store - pointer="closurePointer__0" + pointer=(local "closurePointer__0") layout=(struct (function-ptr (struct (int int)))) offset=(1 0) - value="local__a" + value=(local "local__a") ) ( memory-store - pointer="closurePointer__0" + pointer=(local "closurePointer__0") layout=(struct (function-ptr (struct (int int)))) offset=(1 1) - value="local__b" + value=(local "local__b") ) ) -- cgit v1.2.3